package Application.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import Application.entity.Course;
import Application.service.CourseService;

@CrossOrigin	
@RestController
@RequestMapping("/Course")
public class CourseControl {

	@Resource
	private CourseService service;
	
	@PostMapping("/findCourseByStudentId")
	public List<Course> getCourseByStudentId(int id){
		return service.getCourseByStudentId(id);
	}
}
